package dao;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cn.log.Log;

public class PictureDao {
	public static List getPicture(Map m){
		try {
			List pictures = (List) SqlClient.getSqlMap().queryForList("selectPicture",m);
			return pictures;
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	public static void addPicture(Map m){
		try {
			SqlClient.getSqlMap().insert("insertPicture",m);
			
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
	}
	
	public static boolean isExistSrc(Map m){
		if(getPicture(m).size()>0){
			return true;
		}else{
			return false;
		}
	}
}
